

***********************************************************************************************************************
**** Table 4. No Heterogeneous Treatment Effects with Respect to Sanctioning Probability ******************************
***********************************************************************************************************************

use "$data/Non_payment_dataset_ready.dta" , clear

log using "$filepath/output_logs/table 4", replace



tab debtgroup, gen(debtgroupdummy)

probit paidcount itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh i.debtgroupdummy* premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew*  if t==14, vce(cluster customer)
margins, dydx(itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh) post

reg lnpayment itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh debtgroupdummy* premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew* i.t if t==14, vce(cluster customer)

preserve 
keep if t==14
capture program drop Ey_boot
program define Ey_boot, eclass
twopm payment itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh debtgroupdummy* premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew*, firstpart(probit) secondpart(regress, log) vce(cluster customer)
margins, dydx(itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh) predict(duan) nose post
end
bootstrap _b, seed(3125) reps(1000): Ey_boot
estimates store highlow
restore
test itt2high = itt2veryhigh
test itt3high = itt3veryhigh

reg asinhpayment itt2low itt2high itt2veryhigh itt3low itt3high itt3veryhigh i.debtgroup i.debtgroupdummy* premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* schemedummynew*  if t==14,  vce(cluster customer)
*di exp(2.7552)-1

log close
